hotfun = {}



y3.game:event({ GlobalEventType['KEYBOARD_DOWN'], KeyboardKey.F5 }, function(_, data)
    if GT.debug then

        reloadlua("game.main")
        
        
    end
end)
function reloadlua(name)
    package.loaded[name] = nil
    -- for key, value in pairs(hotfun) do
    --     value()
    -- end
    hotfun = {}
    print_debug("热更-" .. name .. "-完成！")
    collectgarbage("collect")
    return (require(name))
end
